package com.youlu.campus.entity.course;

import com.youlu.campus.base.base.EntityBase;
import lombok.Data;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author : [dengbo]
 * @className : ActivityCourseVideo
 * @description : [活动课程视频]
 * @createTime : [2022/5/16 14:39]
 */
@Data
@Document(collection = "activity_course_video")
@CompoundIndexes({
        @CompoundIndex(name = "idx_course_priority", def = "{'courseId':-1,'priority':-1}")
})
public class ActivityCourseVideo extends EntityBase {
    /**
     * 视频ID
     */
    private String courseId;
    /**
     * 视频类型: 0:视频、1:音频、2:图片、3:文字
     */
    private Integer type;
    /**
     * 视频名称
     */
    private String name;
    /**
     * 视频/音频 封面地址
     */
    private String coverUrl;
    /**
     * 视频/音频 资源地址
     */
    private String resourceUrl;
    /**
     * 优先级排序 1 越小排在前面
     */
    private Integer priority = 0;
    /**
     * 视频是否上架 默认0下架 1上架
     */
    private Integer valid = 0;
    /**
     * 视频总时长 时间秒
     */
    private Integer totalDuration;
    /**
     * 视频描述
     */
    private String description;

    /**
     * 1、不试看
     * 2、试看
     */
    private Integer tryPlay = 1;

}
